﻿using System;
using System.Configuration;

namespace NDBGen.Configuration
{
    public class ProjectManagedEntryConfigurationElement : ConfigurationElement
    {
        const String PROPNAME_PROJECTFILEMANAGER = "projectFileManager";
        [ConfigurationProperty(PROPNAME_PROJECTFILEMANAGER, IsKey = true, IsRequired = false)]
        public String ProjectFileManager
        {
            get { return (String)this[PROPNAME_PROJECTFILEMANAGER]; }
            set { this[PROPNAME_PROJECTFILEMANAGER] = value; }
        }

        const String PROPNAME_PROJECTFILE = "projectFile";
        [ConfigurationProperty(PROPNAME_PROJECTFILE, IsKey = true, IsRequired = false)]
        public String ProjectFile
        {
            get { return (String)this[PROPNAME_PROJECTFILE]; }
            set { this[PROPNAME_PROJECTFILE] = value; }
        }

        const String PROPNAME_PROJECTROOT = "projectRoot";
        [ConfigurationProperty(PROPNAME_PROJECTROOT, IsKey = true, IsRequired = false)]
        public String ProjectRoot
        {
            get { return (String)this[PROPNAME_PROJECTROOT]; }
            set { this[PROPNAME_PROJECTROOT] = value; }
        }

        const String PROPNAME_SEPARATEFILES = "separateFiles";
        [ConfigurationProperty(PROPNAME_SEPARATEFILES, IsKey = true, IsRequired = false, DefaultValue = true)]
        public Boolean SeparateFiles
        {
            get { return (Boolean)this[PROPNAME_SEPARATEFILES]; }
            set { this[PROPNAME_SEPARATEFILES] = value; }
        }

        const String PROPNAME_SETTINGS = "settings";
        // language
        // rootNamespace
        [ConfigurationCollection(typeof(SettingElement))]
        [ConfigurationProperty(PROPNAME_SETTINGS)]
        public GenericElementCollection<SettingElement> Settings
        {
            get { return (GenericElementCollection<SettingElement>)this[PROPNAME_SETTINGS]; }
            set { this[PROPNAME_SETTINGS] = value; }
        }
    }
}